<%
    String path = request.getContextPath();
    int port=request.getServerPort();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    if(port==80){
        basePath = request.getScheme()+"://"+request.getServerName()+path+"/";
    }
%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%--
  Created by IntelliJ IDEA.
  User: zll
  Date: 2018/5/30
  Time: 10:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>首页</title>
    <link rel="stylesheet" href="<%=basePath%>/layui/css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">首页</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">

        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    贤心
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="/user/login">退了</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                   <shiro:hasPermission name="010"><a class="" href="javascript:;">权限管理</a></shiro:hasPermission>
                    <dl class="layui-nav-child">
                        <shiro:hasPermission name="011"> <dd><a href="/page/role/list" target="mainFrame">后台用户管理</a></dd></shiro:hasPermission>
                        <shiro:hasPermission name="012"> <dd><a href="/page/role/listrole" target="mainFrame">角色管理</a></dd></shiro:hasPermission>
                    </dl>
                </li>
            </ul>
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                        <shiro:hasPermission name="020"><a class="" href="javascript:;">活动管理</a></shiro:hasPermission>
                    <dl class="layui-nav-child">
                        <shiro:hasPermission name="021"><dd><a href="/page/role/listactivitys?type=0" target="mainFrame">任务活动</a></dd></shiro:hasPermission>
                        <shiro:hasPermission name="021"><dd><a href="/page/role/listactivitys?type=1" target="mainFrame">投票活动</a></dd></shiro:hasPermission>
                        <shiro:hasPermission name="021"><dd><a href="/page/role/listactivitys?type=2" target="mainFrame">签到活动</a></dd></shiro:hasPermission>
                        <shiro:hasPermission name="021"><dd><a href="/page/role/listactivitys?type=3" target="mainFrame">助力活动</a></dd></shiro:hasPermission>
                        <shiro:hasPermission name="021"><dd><a href="/page/role/listactivitys?type=4" target="mainFrame">宣传活动</a></dd></shiro:hasPermission>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body" style="overflow: hidden">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;height: 100%">
            <iframe id="mainFrame" name="mainFrame" frameborder="0" width="100%" height="100%"></iframe>
        </div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © 版权所有
    </div>
</div>
<script src="<%=basePath%>/layui/layui.js"></script>
<script src="<%=basePath%>/myjs/comm.js"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;
        console.log(element);
    });
</script>
</body>
</html>
